import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: () => import('../views/account/login')
  }, {
    path: '/test',
    component: () => import('../views/test')
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('../views/Home'),
    redirect: '/cgsqdMg/weihu',
    children: [
      //采购合同
      {
        path: '/cghtMg/add',
        name: '/cghtMg/add',
        component: () => import ('@/views/cghtMg/add/index.vue'),
      },   {
        path: '/cghtMg/weihu',
        name: '/cghtMg/weihu',
        component: () => import ('@/views/cghtMg/weihu/index.vue'),
      },  {
        path: '/cghtMg/htzxqkbb',
        name: '/cghtMg/htzxqkbb',
        component: () => import ('@/views/cghtMg/htzxqkbb/index.vue'),
      },  {
        path: '/cghtMg/htjezxmxb',
        name: '/cghtMg/htjezxmxb',
        component: () => import ('@/views/cghtMg/htjezxmxb/index.vue'),
      }, {
        path: '/cghtMg/htjezxhzb',
        name: '/cghtMg/htjezxhzb',
        component: () => import ('@/views/cghtMg/htjezxhzb/index.vue'),
      },


        //采购申请
      {
        path: '/cgsqdMg/add',
        name: '/cgsqdMg/add',
        component: () => import ('@/views/cgsqdMg/add/index.vue'),
      }, {
        path: '/cgsqdMg/weihu',
        name: '/cgsqdMg/weihu',
        component: () => import ('@/views/cgsqdMg/weihu/index.vue'),
      },

      //采购订单
      {
        path: '/cgddMg/add',
        name: '/cgddMg/add',
        component: () => import ('@/views/cgddMg/add/index.vue'),
      },  {
        path: '/cgddMg/weihu',
        name: '/cgddMg/weihu',
        component: () => import ('@/views/cgddMg/weihu/index.vue'),
      },  {
        path: '/cgddMg/cankan',
        name: '/cgddMg/cankan',
        component: () => import ('@/views/cgddMg/cankan/index.vue'),
      },  {
        path: '/cgddMg/cdddzxqkhzb',
        name: '/cgddMg/cdddzxqkhzb',
        component: () => import ('@/views/cgddMg/cdddzxqkhzb/index.vue'),
      },  {
        path: '/cgddMg/cgddzxqkmxb',
        name: '/cgddMg/cgddzxqkmxb',
        component: () => import ('@/views/cgddMg/cgddzxqkmxb/index.vue'),
      },  {
        path: '/cgddMg/cgddqcgzbb',
        name: '/cgddMg/cgddqcgzbb',
        component: () => import ('@/views/cgddMg/cgddqcgzbb/index.vue'),
      },

      //收料通知
      {
        path: '/slMg/add',
        name: '/slMg/add',
        component: () => import ('@/views/slMg/add/index.vue'),
      }, {
        path: '/slMg/smld',
        name: '/slMg/smld',
        component: () => import ('@/views/slMg/smld/index.vue'),
      }, {
        path: '/slMg/weihu',
        name: '/slMg/weihu',
        component: () => import ('@/views/slMg/weihu/index.vue'),
      },


      //外购入库
      {
        path: '/wgrkMg/add',
        name: '/wgrkMg/add',
        component: () => import ('@/views/wgrkMg/add/index.vue'),
      },
  {
        path: '/wgrkMg/weihu',
        name: '/wgrkMg/weihu',
        component: () => import ('@/views/wgrkMg/weihu/index.vue'),
      },
  {
        path: '/wgrkMg/smld',
        name: '/wgrkMg/smld',
        component: () => import ('@/views/wgrkMg/smld/index.vue'),
      },



      //采购发票
      {
        path: '/cgfpMg/add',
        name: '/cgfpMg/add',
        component: () => import ('@/views/cgfpMg/add/index.vue'),
      },  {
        path: '/cgfpMg/zysmld',
        name: '/cgfpMg/zysmld',
        component: () => import ('@/views/cgfpMg/zysmld/index.vue'),
      },  {
        path: '/cgfpMg/ptsmld',
        name: '/cgfpMg/ptsmld',
        component: () => import ('@/views/cgfpMg/ptsmld/index.vue'),
      },  {
        path: '/cgfpMg/weihu',
        name: '/cgfpMg/weihu',
        component: () => import ('@/views/cgfpMg/weihu/index.vue'),
      },  {
        path: '/cgfpMg/gjrz',
        name: '/cgfpMg/gjrz',
        component: () => import ('@/views/cgfpMg/gjrz/index.vue'),
      },  {
        path: '/cgfpMg/cgfpmxb',
        name: '/cgfpMg/cgfpmxb',
        component: () => import ('@/views/cgfpMg/cgfpmxb/index.vue'),
      },  {
        path: '/cgfpMg/gxwwjgfdzb',
        name: '/cgfpMg/gxwwjgfdzb',
        component: () => import ('@/views/cgfpMg/gxwwjgfdzb/index.vue'),
      },



      //费用发票
      {
        path: '/fyfpMg/add',
        name: '/fyfpMg/add',
        component: () => import ('@/views/fyfpMg/add/index.vue'),
      }, {
        path: '/fyfpMg/weihu',
        name: '/fyfpMg/weihu',
        component: () => import ('@/views/fyfpMg/weihu/index.vue'),
      }, {
        path: '/fyfpMg/fyfphzb',
        name: '/fyfpMg/fyfphzb',
        component: () => import ('@/views/fyfpMg/fyfphzb/index.vue'),
      }, {
        path: '/fyfpMg/fyfpmxb',
        name: '/fyfpMg/fyfpmxb',
        component: () => import ('@/views/fyfpMg/fyfpmxb/index.vue'),
      },


      //退料通知
      {
        path: '/tltzMg/add',
        name: '/tltzMg/add',
        component: () => import ('@/views/tltzMg/add/index.vue'),
      }, {
        path: '/tltzMg/weihu',
        name: '/tltzMg/weihu',
        component: () => import ('@/views/tltzMg/weihu/index.vue'),
      },



      //库存查询
      {
        path: '/kccxMg/jskccx',
        name: '/kccxMg/jskccx',
        component: () => import ('@/views/kccxMg/jskccx/index.vue'),
      },  {
        path: '/kccxMg/kcztcx',
        name: '/kccxMg/kcztcx',
        component: () => import ('@/views/kccxMg/kcztcx/index.vue'),
      },
    ]
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
